'use strict';

module.exports = app => {
  const { STRING, INTEGER } = app.Sequelize;

  const Personnel = app.model.define('personnel', {
    id: { type: INTEGER, primaryKey: true, autoIncrement: true },
    uid: STRING,
    fileId: STRING,
    userName: STRING,
    enName: STRING,
    sex: INTEGER,
    regionalAddress: STRING,
    isFullTime: INTEGER,
    cooperationUnit: STRING,
    isRetirement: INTEGER,
    branchPersonnel: STRING,
    idType: STRING,
    depositBank: STRING,
    idNo: STRING,
    accountBank: STRING,
    birthDate: STRING,
    department: STRING,
    phone: STRING,
    email: STRING,
    fixedPhone: STRING,
    fax: STRING,
    emergencyContact: STRING,
    emergencyCall: STRING,
    postcode: STRING,
    mnemonics: STRING,
    mailAddress: STRING,
    workUnitName: STRING,
    mark: STRING,
    expire: INTEGER,
    nature: INTEGER,
    jobTitle: STRING,
    officeStaff: INTEGER,
    contractStart: STRING,
    contractEnd: STRING,
    protocolStart: STRING,
    protocolEnd: STRING,
    onboarding: STRING,
    resign: STRING,
    social: STRING,
    employment: INTEGER,
    confidential: INTEGER,
    level: STRING,
    ca: STRING,
    userRank: STRING,
  });

  return Personnel;
};
